0634e4cc9f03e5a0a49c1c197de48ff6f9c40d8c,src/main/java/com/net2plan/gui/utils/focusPane/FigureDemandSequencePanel.java,FigureDemandSequencePanel,paintComponent,#Graphics#,36
Before Change
final int xSeparationDnCenters = maxIconSize * 3;
/* Initial dn */
DrawNode.addNodeToGraphics(g2d, ingressNode, initialDnTopLeftPosition, fontMetrics, regularInterlineSpacePixels, null);
DrawNode.addNodeToGraphics(g2d, egressNode, new Point(initialDnTopLeftPosition.x + xSeparationDnCenters, initialDnTopLeftPosition.y), fontMetrics, regularInterlineSpacePixels, null);
drawnNodes.add(ingressNode);
After Change
/* Initial dn */
Point auxPoint;
Point southEastPoint = new Point (0,0);
auxPoint = DrawNode.addNodeToGraphics(g2d, ingressNode, initialDnTopLeftPosition, fontMetrics, regularInterlineSpacePixels, null);
southEastPoint = southEastPoint(southEastPoint , auxPoint);
auxPoint = DrawNode.addNodeToGraphics(g2d, egressNode, new Point(initialDnTopLeftPosition.x + xSeparationDnCenters, initialDnTopLeftPosition.y), fontMetrics, regularInterlineSpacePixels, null);
southEastPoint = southEastPoint(southEastPoint , auxPoint);
drawnNodes.add(ingressNode);
drawnNodes.add(egressNode);
final DrawLine link = new DrawLine(ingressNode, egressNode, ingressNode.posEast(), egressNode.posWest());
auxPoint = DrawLine.addLineToGraphics(g2d, link, fontMetrics, regularInterlineSpacePixels,lineStroke);
southEastPoint = southEastPoint(southEastPoint , auxPoint);
preferredSize = new Dimension (southEastPoint.x + XYMARGIN , southEastPoint.y + XYMARGIN);
}
private static Point southEastPoint (Point a , Point b) { return new Point (Math.max(a.x , b.x), Math.max(a.y,b.y)); }